import React from "react";
import {createPortal} from "react-dom"

class Component extends React.Component{
  constructor(props){
    super(props)
    this.dom = document.createElement('div')
    this.dom.setAttribute('id','protal')
    document.body.appendChild(this.dom)
  }
  render(){
    return createPortal(<>{this.props.children}</>,this.dom)
  }
}
export default Component